package com.xtck.ha.system.api.factory;

import com.xtck.ha.common.core.domain.R;
import com.xtck.ha.system.api.RemoteDictService;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author zhouss
 * @date 2024/11/20
 **/
@Component
public class RemoteDictFallbackFactory implements FallbackFactory<RemoteDictService> {
    @Override
    public RemoteDictService create(Throwable throwable) {
        return (dictType) -> R.fail("获取字典列表信息失败:" + throwable.getMessage());
    }
}
